


local mt = ac.skill['追猎之刃']
mt.temp = '攻击触发'
mt.model1 = [[3396471125021abea258554f8fb0cd96.mdx]]
mt.speed = 1200

function mt:on_run(hero,target)
    local hero = self.owner
    local selector = ac.selector('unit'):range(target,300):enemy(hero):is_not(target)
    local damage = hero:get('攻击') * self.data1/100
    local first = target
    hero:launch_missile(first,self.model1,self.speed,0.15,function()
        hero:create_damage(first,damage,self)
    end)
    for a=1,2 do
        local unit = selector:random()
        if unit then
            selector = selector:is_not(unit)
            hero:launch_missile(unit,self.model1,self.speed,0.15,function()
                hero:create_damage(unit,damage,self)
            end)
        else
            break
        end
    end
end




local mt = ac.skill['赏金']
local gold = {2,3,4,5}
function mt:on_add()
    local hero = self.owner
    local level = math.ceil(ac.enemy.day/4)
    self.data1 = gold[level]
    self:gc(hero:add('敏捷成长',self.data2))
    self:gc(hero:add('杀敌金币',self.data1))
    self:gc(ac.game:event '游戏-新的一天'(function()
        self:gc_clear()
        self:on_add()
    end))
end
